﻿using GameX.GameContent;

namespace GameX.MapEngine
{
    abstract class MapProvider
    {
        public virtual Map GetMap(uint width, uint height, ISpriteSheet spriteSheet)
        {
            var map = new Map(width, height, spriteSheet);

            for (uint x = 0; x < width; x++)
            {
                for (uint y = 0; y < width; y++)
                {
                    map.SetTileAt(x, y, GetTileAt(x, y));
                }
            }

            return map;
        }

        protected abstract Tile GetTileAt(uint x, uint y);
    }
}
